<?php $this->headStyle()->captureStart()?>
    #content td { padding:5px}
    #content table { border:1px #aaa solid; padding:5px; width:100%}
    #content th {font-weight:bold;}
    #content input {width:140px}
<?php $this->headStyle()->captureEnd()?>
<?php $this->JQuery()->javascriptCaptureStart() ?>
$j(document).ready(function() {
	$j("#submitedit").click(function(){
		$j.ajax({
			type: 'post',
			url: '<?php echo $this->geturl('edit','comment', null, 'admin1');?>',
			data: 'id=<?php echo $this->comment->_id?>&content='+$j('table textarea').val(),
			dataType: 'json',
			success: function(data){
				if(data.status == 'success'){
					alert('Edit successfully');
				}
			}
		})
	})
})
<?php $this->JQuery()->javascriptCaptureEnd() ?>

<table border="1">
	<tr>
		<th>User Name</th>
		<td><?php echo Model_User::find($this->comment->user_id)->username;?></td>
	</tr>
	<tr>
		<th>Email</th>
		<td><?php echo Model_User::find($this->comment->user_id)->email;?></td>
	</tr>
	<tr>
		<th>Content</th>
		<td><textarea style='width:100%; min-height:200px;'><?php echo $this->comment->content;?></textarea></td>
	</tr>
</table>
<input type="button" value="edit" id=submitedit><br>
<a href="<?php echo $this->geturl('changestatus', 'comment', null, 'admin1', array('id'=>$_GET['id'], 'status'=>1))?>">Passed</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="<?php echo $this->geturl('changestatus', 'comment', null, 'admin1', array('id'=>$_GET['id'], 'status'=>0))?>">Unpassed</a>
